from django.db.models.loading import cache
import settings


def get_profile_class(profile_type):
    from collector import ProfileCollector
    return ProfileCollector.profiles[profile_type]

def get_user_class(base=False):
    if base:
        model = settings.PROFILES_USER_MODEL.split('.', 1)
        return cache.get_model(*model)
    else:
        from multiprofiles.models import ProfiledUser
        return ProfiledUser
